package state;

import main.Game;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;

import button.Button;
import button.StandardButton;
import constans.Flag;
import constans.ResourceManager;

public class AuthorsState extends State{
	
	Button backButton;

	public AuthorsState()
	{
		backButton  = new StandardButton(140,203,100,50,Flag.damageButton,ResourceManager.getImage("back"),ResourceManager.getSound("click"));
		
	}
	
	public void render(GameContainer container, Graphics g) throws SlickException
	{	
		super.render(container, g);
		backButton.render(container, g);
		g.drawString("Developer: Maciej Koch", 400, 200);
		g.drawString("Designer: Pawel Krakowiak", 450, 250);
	}
	public void update(GameContainer container, int delta) throws SlickException
	{	
		Input input = container.getInput();
		backButton.hover(input);
		if(backButton.click(input))
			Game.setState(Flag.startState, 0);

	}

}
